﻿@model Dinamico.Models.ContentPart
		   
@{
	Content.Define(ie => ie.Title = "Content Slider");
	string uniqueId = Html.UniqueID("cs");
}

@{ Html.Resources().JavaScript(Url.ThemedContent("~/Scripts/jquery.anythingslider.js")); }

<div class="slider contentSlider">
	<div id="@uniqueId">@Content.Register.FreeText("Text").Configure(a => a.Rows = 10).Configure(a => a.TextMode = System.Web.UI.WebControls.TextBoxMode.MultiLine)</div>

	<script type="text/javascript">
		$(document).ready(function () {
			var $container = $("#@uniqueId");
			$container.wrapInner("<ul/>").children("ul")
				.children("*").wrap("<li/>").each(function(){
					if($(this).text().length > 0)
						$(this).wrap("<div class='textual'/>").wrap("<div class='textual-inner'/>");
				}).end()
				.each(function(){
					var $t = $(this);
					$t.anythingSlider({ width: $container.width(), delay:5000, animationTime:200, resizeContents:true, buildArrows:false });
				});
		});
	</script>
</div>